package com.lindroy.androidplayer.ui.adapter

import androidx.fragment.app.Fragment
import com.lindroy.androidplayer.R
import com.lindroy.androidplayer.base.adapter.BaseTabAdapter
import com.lindroy.androidplayer.ui.main.fragment.*

/**
 * @author Lin
 * @date 2022/3/7
 * @function
 */
class MainTabAdapter(fragment: Fragment) : BaseTabAdapter<Int>(fragment) {
    override fun createItemFragment(item: Int) = when (item) {
        R.id.homeFragment -> HomeFragment.newInstance()
        R.id.findFragment -> FindFragment.newInstance()
        R.id.projectFragment -> ProjectFragment.newInstance()
        R.id.wxChapterFragment -> WxChaptersFragment.newInstance()
        R.id.mineFragment -> MineFragment.newInstance()
        else -> HomeFragment.newInstance()
    }
}